//Domain
//http://account.x-juse.com/
//Namespace
//Juse.Interface
//ClassName
//JSShop.BLL.Interface.UserProcessor
//请勿修改上述接口信息
namespace Juse.Interface
{
    public class UserProcessor : wnxd.Web.InterfaceBase
    {
        public UserProcessor()
        {
            this.Domain = "http://account.x-juse.com/";
            this.Namespace = "JSShop.BLL.Interface";
            this.ClassName = "UserProcessor";
        }
        /// <summary>
        /// 获取匿名用户model
        /// </summary>
        public JSShop.Model.aspnet_Users GetAnonymousUser()
        {
            wnxd.javascript.json r = this.GetCache(86400, "357043718DF5016555D71ECDB14616B3");
            return (JSShop.Model.aspnet_Users)r.TryConvert(typeof(JSShop.Model.aspnet_Users));
        }
        /// <summary>
        /// 根据username获取用户model,失败返回匿名用户model
        /// </summary>
        public JSShop.Model.aspnet_Users GetUser(System.String username)
        {
            wnxd.javascript.json r = this.GetCache(60, "31EA62E8729E29ED0CD0D5DA7787FF05", username);
            return (JSShop.Model.aspnet_Users)r.TryConvert(typeof(JSShop.Model.aspnet_Users));
        }
        /// <summary>
        /// 根据手机号码或用户名获取用户model
        /// </summary>
        public JSShop.Model.aspnet_Users GetUserByPhone(System.String cellPhone)
        {
            wnxd.javascript.json r = this.Run("9AF9EBA260774543183C46C9ED764D25", cellPhone);
            return (JSShop.Model.aspnet_Users)r.TryConvert(typeof(JSShop.Model.aspnet_Users));
        }
        /// <summary>
        /// 根据userid获取用户member
        /// </summary>
        public JSShop.Model.aspnet_Members GetMember(System.Int32 userId)
        {
            wnxd.javascript.json r = this.GetCache(60, "77430B25062A66B9B8CBB77860F66632", userId);
            return (JSShop.Model.aspnet_Members)r.TryConvert(typeof(JSShop.Model.aspnet_Members));
        }
        /// <summary>
        /// 根据userid获取用户收藏列表
        /// </summary>
        public System.Data.DataTable GetUserFavorites(System.Int32 userId)
        {
            wnxd.javascript.json r = this.Run("DE7EE22AE108D516B57AD07AEC05F00A", userId);
            return (System.Data.DataTable)r.TryConvert(typeof(System.Data.DataTable));
        }
        /// <summary>
        /// 根据userid获取用户地址
        /// </summary>
        public System.Collections.Generic.List<JSShop.Model.Hishop_UserShippingAddresses> GetShippingAddresses(System.Int32 userId)
        {
            wnxd.javascript.json r = this.Run("5F0B0A3FD2151EBA9683668C0690D911", userId);
            return (System.Collections.Generic.List<JSShop.Model.Hishop_UserShippingAddresses>)r.TryConvert(typeof(System.Collections.Generic.List<JSShop.Model.Hishop_UserShippingAddresses>));
        }
        /// <summary>
        /// 添加一条收货地址信息
        /// </summary>
        public System.Int32 AddShippingAddress(JSShop.Model.Hishop_UserShippingAddresses shippingAddress)
        {
            wnxd.javascript.json r = this.Run("52DC898CCF340CB30C8D8B2124022ED6", shippingAddress);
            return (System.Int32)r.TryConvert(typeof(System.Int32));
        }
        /// <summary>
        /// 根据shippingId获取收货地址信息
        /// </summary>
        public JSShop.Model.Hishop_UserShippingAddresses GetShippingAddress(System.Int32 shippingId)
        {
            wnxd.javascript.json r = this.Run("65BA176CCB4E4A8DE49B24D3D6430002", shippingId);
            return (JSShop.Model.Hishop_UserShippingAddresses)r.TryConvert(typeof(JSShop.Model.Hishop_UserShippingAddresses));
        }
        /// <summary>
        /// 修改一条收货地址信息
        /// </summary>
        public System.Boolean UpdateShippingAddress(JSShop.Model.Hishop_UserShippingAddresses shippingAddress)
        {
            wnxd.javascript.json r = this.Run("4E6A2DEBF76D0DB9EA1D1B5A0E649B4D", shippingAddress);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 删除一条收货地址信息
        /// </summary>
        public System.Boolean DelShippingAddress(System.Int32 shippingid, System.Int32 userid)
        {
            wnxd.javascript.json r = this.Run("8C7047899EA5F7968D0535B4FB94E525", shippingid, userid);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 修改优惠券使用状态
        /// </summary>
        public System.Boolean AddCouponUseRecord(JSShop.Model.OrderInfo orderinfo)
        {
            wnxd.javascript.json r = this.Run("34FA247A3411B0E53221A2DFC583A5C0", orderinfo);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        public JSShop.Model.aspnet_MemberGrades GetMemberGrade(System.Int32 gradeId)
        {
            wnxd.javascript.json r = this.Run("760DA6A9463E2AD19A02E8F038550A99", gradeId);
            return (JSShop.Model.aspnet_MemberGrades)r.TryConvert(typeof(JSShop.Model.aspnet_MemberGrades));
        }
        /// <summary>
        /// 根据UserId获取会员价格 返回 -1 为获取失败
        /// </summary>
        public System.Decimal GetMemberPrice(JSShop.Model.aspnet_Members member, System.String skuId, System.Decimal saleprice)
        {
            wnxd.javascript.json r = this.Run("E79DCAC8E6F4D0F1F434264DE49ADB26", member, skuId, saleprice);
            return (System.Decimal)r.TryConvert(typeof(System.Decimal));
        }
        /// <summary>
        /// 根据UserId获取一组会员价格 
        /// </summary>
        public System.Collections.Generic.List<JSShop.Model.MemberSalePrice> GetMemberPriceGroup(System.Collections.Generic.List<JSShop.Model.MemberSalePrice> DataGroup)
        {
            wnxd.javascript.json r = this.Run("E64005591BED1C94BF069EDEED1FA19F", DataGroup);
            return (System.Collections.Generic.List<JSShop.Model.MemberSalePrice>)r.TryConvert(typeof(System.Collections.Generic.List<JSShop.Model.MemberSalePrice>));
        }
        /// <summary>
        /// 更新优惠券
        /// </summary>
        public System.Int32 SetCoupon(JSShop.Model.Hishop_Coupons model)
        {
            wnxd.javascript.json r = this.Run("321F5CF1DF84A1F323979BF4843C7488", model);
            return (System.Int32)r.TryConvert(typeof(System.Int32));
        }
        /// <summary>
        /// 更新优惠券商品信息
        /// </summary>
        public System.Boolean SetCouponProducts(JSShop.Model.Hishop_CouponProducts model)
        {
            wnxd.javascript.json r = this.Run("0009B7278AB273C1E450F06A3512721E", model);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        public System.Boolean SetCouponItems(JSShop.Model.Hishop_CouponItems model)
        {
            wnxd.javascript.json r = this.Run("4D39BC0189EA3B50DDC6FAB8BEE4B779", model);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 获取会员列表
        /// </summary>
        public JSShop.Model.DbQueryResultMember GetMemberList(System.Int32 pageIndex, System.Int32 pageSize, System.Collections.Generic.Dictionary<System.String, System.String> dic)
        {
            wnxd.javascript.json r = this.Run("C2CC386239BC6C1FBA57D1117BBD93D8", pageIndex, pageSize, dic);
            return (JSShop.Model.DbQueryResultMember)r.TryConvert(typeof(JSShop.Model.DbQueryResultMember));
        }
        /// <summary>
        /// 获取会员试图model
        /// </summary>
        public JSShop.Model.vw_aspnet_Members GetMembersModel(System.Int32 userId)
        {
            wnxd.javascript.json r = this.Run("E752DBA2456ED544C1B20693D2E05FF8", userId);
            return (JSShop.Model.vw_aspnet_Members)r.TryConvert(typeof(JSShop.Model.vw_aspnet_Members));
        }
        /// <summary>
        /// 保存会员信息
        /// </summary>
        public System.Boolean SaveUserInfo(JSShop.Model.aspnet_Users model, JSShop.Model.aspnet_Members memmodel, System.Int32 userId)
        {
            wnxd.javascript.json r = this.Run("010DDEE0FBF4A0DEA7BBE5DB5188C624", model, memmodel, userId);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 删除会员
        /// </summary>
        public System.Boolean DelMembers(System.Int32 userId)
        {
            wnxd.javascript.json r = this.Run("EDC7EFAC596EE5AF545DF9AB2D303F7C", userId);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 批量删除会员
        /// </summary>
        public System.Boolean DelMembers(System.Int32[] userId)
        {
            wnxd.javascript.json r = this.Run("21CF50EC5C98EDC02541EE68D75ACAF2", userId);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 获取会员等级列表
        /// </summary>
        public System.Collections.Generic.IList<JSShop.Model.aspnet_MemberGrades> GetMemberGradeList(System.String strwhere)
        {
            wnxd.javascript.json r = this.Run("95CEE0BBEA8895200468954720A572EF", strwhere);
            return (System.Collections.Generic.IList<JSShop.Model.aspnet_MemberGrades>)r.TryConvert(typeof(System.Collections.Generic.IList<JSShop.Model.aspnet_MemberGrades>));
        }
        /// <summary>
        /// 获取会员等级model
        /// </summary>
        public JSShop.Model.aspnet_MemberGrades GetMemberGradeModel(System.Int32 GradeId)
        {
            wnxd.javascript.json r = this.Run("F6FEBB1EFAFDCE863AF89C90272693E2", GradeId);
            return (JSShop.Model.aspnet_MemberGrades)r.TryConvert(typeof(JSShop.Model.aspnet_MemberGrades));
        }
        /// <summary>
        /// 添加会员等级
        /// </summary>
        public System.Boolean AddMembersGrade(JSShop.Model.aspnet_MemberGrades model)
        {
            wnxd.javascript.json r = this.Run("8948A3B2C438C10C1D1B31F91E8FC41F", model);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 修改会员等级
        /// </summary>
        public System.Boolean UpdateMembersGrade(JSShop.Model.aspnet_MemberGrades model)
        {
            wnxd.javascript.json r = this.Run("D904A38E979A5B52C1171E6AE65C16A6", model);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 删除会员等级
        /// </summary>
        public System.Boolean DeleteMembersGrade(System.String Gradeids)
        {
            wnxd.javascript.json r = this.Run("458C8B2375B0C6286A0BB04C3F70B09F", Gradeids);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 设置默认会员等级
        /// </summary>
        public System.Boolean IsDefaultVip(System.Int32 GradeId)
        {
            wnxd.javascript.json r = this.Run("C3248F5C9CB2600A06486687C2CDF496", GradeId);
            return (System.Boolean)r.TryConvert(typeof(System.Boolean));
        }
        /// <summary>
        /// 获取所有符合条件的优惠券
        /// </summary>
        public System.Collections.Generic.List<JSShop.Model.CouponInfo> GetCouponList(System.Int32 userId, JSShop.Model.ShoppingCartInfo shoppingCart)
        {
            wnxd.javascript.json r = this.GetCache(120, "7B99157E82CEF5082A6414E58CF109AB", userId, shoppingCart);
            return (System.Collections.Generic.List<JSShop.Model.CouponInfo>)r.TryConvert(typeof(System.Collections.Generic.List<JSShop.Model.CouponInfo>));
        }
        /// <summary>
        /// 使用优惠券
        /// </summary>
        public JSShop.Model.Hishop_Coupons UseCoupon(System.Int32 UserId, System.String OrderId, JSShop.Model.ShoppingCartInfo shoppingCart, System.String ClaimCode)
        {
            wnxd.javascript.json r = this.Run("936873EB30DAFCDC70B1679BF3EE831D", UserId, OrderId, shoppingCart, ClaimCode);
            return (JSShop.Model.Hishop_Coupons)r.TryConvert(typeof(JSShop.Model.Hishop_Coupons));
        }
        /// <summary>
        /// 获取所有优惠券信息
        /// </summary>
        public System.Collections.Generic.List<JSShop.Model.Hishop_Coupons> GetAllCoupons(System.String strWhere)
        {
            wnxd.javascript.json r = this.Run("33063135B1066144398B20D60639BAA8", strWhere);
            return (System.Collections.Generic.List<JSShop.Model.Hishop_Coupons>)r.TryConvert(typeof(System.Collections.Generic.List<JSShop.Model.Hishop_Coupons>));
        }
        /// <summary>
        /// 获取分页优惠券信息
        /// </summary>
        public JSShop.Model.DQueryResultManageCoupons GetPagingCoupons(System.Collections.Generic.Dictionary<System.String, System.String> dic)
        {
            wnxd.javascript.json r = this.Run("AAEB7676968C067BCBD0458CF10086D1", dic);
            return (JSShop.Model.DQueryResultManageCoupons)r.TryConvert(typeof(JSShop.Model.DQueryResultManageCoupons));
        }
        /// <summary>
        /// 获取优惠券使用详情
        /// </summary>
        public JSShop.Model.DQueryResultManageCouponItems GetPagingCouponItems(System.Collections.Generic.Dictionary<System.String, System.String> dic)
        {
            wnxd.javascript.json r = this.Run("78C1E900C7102F5009547EC95D14EBAE", dic);
            return (JSShop.Model.DQueryResultManageCouponItems)r.TryConvert(typeof(JSShop.Model.DQueryResultManageCouponItems));
        }
    }
}